Programming Paradigms as Object Classes: A Structuring Mechanism for Multiparadigm Programming
نویسندگان
چکیده
The word paradigm, is used in computer science to talk about a family of notations, that share a common way for describing program implementations. Since each paradigm is well suited for solving only a range of problems, ideally a large system should be subdivided into components, each of which should be implemented in the most appropriate paradigm. Multiparadigm programming, allows the programmer to implement a system, in a number of different paradigms. The use of multiparadigm programming techniques, could lower implementation costs, and result in more reliable and efficient applications. The difficulties that arise with multiparadigm programming can be separated into the areas of application development in multiple paradigms, design and implementation of multiparadigm environment, and generators for creating such environments. We propose the use of object-oriented design techniques as a method for encapsulating programming paradigms within multiparadigm applications, and for abstracting common characteristics across paradigms. These techniques can be used to design practical multiparadigm environment generators, and implement multiparadigm programming environments supporting a wide variety of paradigms. In order to demonstrate the validity of our approach, we describe the design and implementation of three prototypes: one in each problem area. The integrator is a multiparadigm application dealing with the numeric and symbolic evaluation of integrals. The symbolic evaluation is based on the backtracking resolution mechanism offered by the logic programming paradigm, and the numeric evaluation, on the infinite streams implemented in the functional paradigm. Additionally, lexical analysis of the input expressions is described using regular expressions, and the expression grammar is described using a BNF syntax. Finally, expression simplification uses a term rewrite system, and graphing of functions is done by directly interacting with Unix tools. Integrator is implemented in the blueprint multiparadigm programming environment, a prototype implementation of the six paradigms based on our object-oriented approach. Many different implementation techniques have been applied in order to demonstrate the wide applicability of our approach. Some of the paradigms are implemented as compilers (using existing implementations where possible), and others are implemented as interpreters. Finally, the implementation of blueprint is based on the MPSS multiparadigm environment generator. This, allows the description of paradigms as object classes using paradigm description files. Additionally, it provides a multiparadigm link editor, and support for incorporating existing compilers into multiparadigm programming environments.
منابع مشابه
Using Objects for Structuring Multiparadigm Programming Environments
Multiparadigm programming allows the programmer to write the implementation of a system in a number of different paradigms. We describe our approach to multiparadigm programming based on modeling programming paradigms as object classes. In particular, objects can be used to encapsulate program modules, and classes to encapsulate their respective paradigms. The paradigm class hierarchy can then ...
متن کاملI+: A Multiparadigm Language for Object-Oriented Declarative Programming
This paper presents a multiparadigm language I+ which is an integration of the three major programming paradigms: object-oriented, logic and functional. I+ has an object-oriented framework in which the notions of classes, objects, methods, inheritance and message passing are supported. Methods may be specified as clauses or functions, thus the two declarative paradigms are incorporated at the m...
متن کاملLanguage and Architecture Paradigms as Object Classes: A Unified Approach Towards Multiparadigm Programming
Computer language paradigms offer linguistic abstractions and proof theories for expressing program implementations. Similarly, system architectures offer the hardware abstractions and quantitative theories applicable to the execution of compiled programs. Although the two entities are usually treated independently, object-oriented technology can be used to obtain a unifying framework. Specific...
متن کاملLogic programming in the context of multiparadigm programming: the Oz experience
Oz is a multiparadigm language that supports logic programming as one of its major paradigms. A multiparadigm language is designed to support different programming paradigms (logic, functional, constraint, object-oriented, sequential, concurrent, etc.) with equal ease. This article has two goals: to give a tutorial of logic programming in Oz and to show how logic programming fits naturally into...
متن کاملOO++: Exploring the Multiparadigm Shift
Programming languages and the programming paradigms they embody co-evolve over time. Within industrial and academic circles, for example, object-oriented programming has evolved from and effectively replaced imperative programming. More recently, many object-oriented languages have assimilated features from other programming paradigms, evolving into multiparadigm languages we refer to as ”objec...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1994